Skip to content

Conversation

olestan
Copy link
Member

@olestan olestan commented Oct 28, 2026 •

Summary

Expanded the database seeding functionality with 51 realistic demo recipes and matching WebP images.

This provides representative content for the Explore page and improves the application's demonstration and testing experience.

Changes

  • Added 51 local WebP recipe images, each 1200x800.
  • Created seedRecipes.ts with recipe definitions, including:
    • Titles and descriptions
    • Categories, cuisines, and difficulties
    • Preparation and cooking times
    • Servings
    • Ingredients and instructions
    • Tags and visibility
  • Updated seedData.ts to copy images into upload storage and register them in the database.
  • Added deterministic recipe and image IDs for repeatable seeding.
  • Configured 49 public and 2 private recipes.
  • Preserved existing demo user passwords when reseeding.
  • Updated the existing API integration test to validate seeded data and repeatability.

Testing

  • npm run check
  • npm run test:db
  • npm run test:api
  • npm run test:e2e
  • npm run db:seed
  • Manually verified seeded recipes and images in Explore.

Notes

  • Seeding is opt-in through npm run db:seed.
  • No database schema changes are required.
  • Images use the existing upload storage and /uploads/ endpoint.
  • The seed script must be run manually on the VM with the correct database and upload directory.

AI usage

AI assistance was used to help structure recipe definitions, implement the seeding logic, and update the API integration test.

Generated code and recipe content were reviewed and tested against the project's existing architecture.

Closes #61

@olestan olestan requested a review from a team as a code owner October 28, 2026 17:42
Copy link
Member

@oliveror oliveror left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM – especially beef-burger.webp ;)

Make sure docs are up to date with these changes, either on this branch or a separate branch.

@olestan olestan merged commit 71dc93f into dev Oct 29, 2026
2 checks passed
@olestan olestan deleted the chore/add-seeded-recipes branch October 29, 2026 15:08
oliveror pushed a commit that referenced this pull request Oct 30, 2026
* Style/improve UI consistency (#63)

* style(recipes): improve recipe form layout and image upload UI

* style(recipes): improve drag handle styling and alignment

* style(auth): refine login and registration form spacing

* test: update tests

* Chore/add seeded recipes (#62)

* chore(recipes): add seeded recipes with local images

* fix(seed): isolate test image uploads from application storage

* docs: update documentation

---------

Co-authored-by: Ole Stangeland <olestan@stud.ntnu.no>
oliveror added a commit that referenced this pull request Nov 12, 2026
…main) (#66)

* Style/improve UI consistency (#63)

* style(recipes): improve recipe form layout and image upload UI

* style(recipes): improve drag handle styling and alignment

* style(auth): refine login and registration form spacing

* test: update tests

* Chore/add seeded recipes (#62)

* chore(recipes): add seeded recipes with local images

* fix(seed): isolate test image uploads from application storage

* docs: update documentation

* Hasan/fix/review accessibility performance (#65)

* Improve recipe sorting, query caching and accessibility coverage

* docs: summarize delivery 3 review improvements and HTTPS clarification

---------

Co-authored-by: hasan.fawzi <hasan.fawzi@hoglund.no>

---------

Co-authored-by: Ole Stangeland <olestan@stud.ntnu.no>
Co-authored-by: Hasan Mohammad Fawzi <hasanmo@stud.ntnu.no>
Co-authored-by: hasan.fawzi <hasan.fawzi@hoglund.no>
Sign in to join this conversation on GitHub.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants